\(\int (c+d x)^2 (a+b \sinh (e+f x))^2 \, dx\) [164]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 20, antiderivative size = 182 \[ \int (c+d x)^2 (a+b \sinh (e+f x))^2 \, dx=-\frac {b^2 d^2 x}{4 f^2}+\frac {a^2 (c+d x)^3}{3 d}-\frac {b^2 (c+d x)^3}{6 d}+\frac {4 a b d^2 \cosh (e+f x)}{f^3}+\frac {2 a b (c+d x)^2 \cosh (e+f x)}{f}-\frac {4 a b d (c+d x) \sinh (e+f x)}{f^2}+\frac {b^2 d^2 \cosh (e+f x) \sinh (e+f x)}{4 f^3}+\frac {b^2 (c+d x)^2 \cosh (e+f x) \sinh (e+f x)}{2 f}-\frac {b^2 d (c+d x) \sinh ^2(e+f x)}{2 f^2} \]

[Out]

-1/4*b^2*d^2*x/f^2+1/3*a^2*(d*x+c)^3/d-1/6*b^2*(d*x+c)^3/d+4*a*b*d^2*cosh(f*x+e)/f^3+2*a*b*(d*x+c)^2*cosh(f*x+
e)/f-4*a*b*d*(d*x+c)*sinh(f*x+e)/f^2+1/4*b^2*d^2*cosh(f*x+e)*sinh(f*x+e)/f^3+1/2*b^2*(d*x+c)^2*cosh(f*x+e)*sin
h(f*x+e)/f-1/2*b^2*d*(d*x+c)*sinh(f*x+e)^2/f^2

Rubi [A] (verified)

Time = 0.13 (sec) , antiderivative size = 182, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.350, Rules used = {3398, 3377, 2718, 3392, 32, 2715, 8} \[ \int (c+d x)^2 (a+b \sinh (e+f x))^2 \, dx=\frac {a^2 (c+d x)^3}{3 d}-\frac {4 a b d (c+d x) \sinh (e+f x)}{f^2}+\frac {2 a b (c+d x)^2 \cosh (e+f x)}{f}+\frac {4 a b d^2 \cosh (e+f x)}{f^3}-\frac {b^2 d (c+d x) \sinh ^2(e+f x)}{2 f^2}+\frac {b^2 (c+d x)^2 \sinh (e+f x) \cosh (e+f x)}{2 f}-\frac {b^2 (c+d x)^3}{6 d}+\frac {b^2 d^2 \sinh (e+f x) \cosh (e+f x)}{4 f^3}-\frac {b^2 d^2 x}{4 f^2} \]

[In]

Int[(c + d*x)^2*(a + b*Sinh[e + f*x])^2,x]

[Out]

-1/4*(b^2*d^2*x)/f^2 + (a^2*(c + d*x)^3)/(3*d) - (b^2*(c + d*x)^3)/(6*d) + (4*a*b*d^2*Cosh[e + f*x])/f^3 + (2*
a*b*(c + d*x)^2*Cosh[e + f*x])/f - (4*a*b*d*(c + d*x)*Sinh[e + f*x])/f^2 + (b^2*d^2*Cosh[e + f*x]*Sinh[e + f*x
])/(4*f^3) + (b^2*(c + d*x)^2*Cosh[e + f*x]*Sinh[e + f*x])/(2*f) - (b^2*d*(c + d*x)*Sinh[e + f*x]^2)/(2*f^2)

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 32

Int[((a_.) + (b_.)*(x_))^(m_), x_Symbol] :> Simp[(a + b*x)^(m + 1)/(b*(m + 1)), x] /; FreeQ[{a, b, m}, x] && N
eQ[m, -1]

Rule 2715

Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d*x]*((b*Sin[c + d*x])^(n - 1)/(d*n))
, x] + Dist[b^2*((n - 1)/n), Int[(b*Sin[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && Integ
erQ[2*n]

Rule 2718

Int[sin[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Cos[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rule 3377

Int[((c_.) + (d_.)*(x_))^(m_.)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> Simp[(-(c + d*x)^m)*(Cos[e + f*x]/f), x]
+ Dist[d*(m/f), Int[(c + d*x)^(m - 1)*Cos[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]

Rule 3392

Int[((c_.) + (d_.)*(x_))^(m_)*((b_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[d*m*(c + d*x)^(m - 1)*((
b*Sin[e + f*x])^n/(f^2*n^2)), x] + (Dist[b^2*((n - 1)/n), Int[(c + d*x)^m*(b*Sin[e + f*x])^(n - 2), x], x] - D
ist[d^2*m*((m - 1)/(f^2*n^2)), Int[(c + d*x)^(m - 2)*(b*Sin[e + f*x])^n, x], x] - Simp[b*(c + d*x)^m*Cos[e + f
*x]*((b*Sin[e + f*x])^(n - 1)/(f*n)), x]) /; FreeQ[{b, c, d, e, f}, x] && GtQ[n, 1] && GtQ[m, 1]

Rule 3398

Int[((c_.) + (d_.)*(x_))^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Int[ExpandIntegrand[
(c + d*x)^m, (a + b*Sin[e + f*x])^n, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[n, 0] && (EqQ[n, 1] ||
IGtQ[m, 0] || NeQ[a^2 - b^2, 0])

Rubi steps \begin{align*} \text {integral}& = \int \left (a^2 (c+d x)^2+2 a b (c+d x)^2 \sinh (e+f x)+b^2 (c+d x)^2 \sinh ^2(e+f x)\right ) \, dx \\ & = \frac {a^2 (c+d x)^3}{3 d}+(2 a b) \int (c+d x)^2 \sinh (e+f x) \, dx+b^2 \int (c+d x)^2 \sinh ^2(e+f x) \, dx \\ & = \frac {a^2 (c+d x)^3}{3 d}+\frac {2 a b (c+d x)^2 \cosh (e+f x)}{f}+\frac {b^2 (c+d x)^2 \cosh (e+f x) \sinh (e+f x)}{2 f}-\frac {b^2 d (c+d x) \sinh ^2(e+f x)}{2 f^2}-\frac {1}{2} b^2 \int (c+d x)^2 \, dx+\frac {\left (b^2 d^2\right ) \int \sinh ^2(e+f x) \, dx}{2 f^2}-\frac {(4 a b d) \int (c+d x) \cosh (e+f x) \, dx}{f} \\ & = \frac {a^2 (c+d x)^3}{3 d}-\frac {b^2 (c+d x)^3}{6 d}+\frac {2 a b (c+d x)^2 \cosh (e+f x)}{f}-\frac {4 a b d (c+d x) \sinh (e+f x)}{f^2}+\frac {b^2 d^2 \cosh (e+f x) \sinh (e+f x)}{4 f^3}+\frac {b^2 (c+d x)^2 \cosh (e+f x) \sinh (e+f x)}{2 f}-\frac {b^2 d (c+d x) \sinh ^2(e+f x)}{2 f^2}+\frac {\left (4 a b d^2\right ) \int \sinh (e+f x) \, dx}{f^2}-\frac {\left (b^2 d^2\right ) \int 1 \, dx}{4 f^2} \\ & = -\frac {b^2 d^2 x}{4 f^2}+\frac {a^2 (c+d x)^3}{3 d}-\frac {b^2 (c+d x)^3}{6 d}+\frac {4 a b d^2 \cosh (e+f x)}{f^3}+\frac {2 a b (c+d x)^2 \cosh (e+f x)}{f}-\frac {4 a b d (c+d x) \sinh (e+f x)}{f^2}+\frac {b^2 d^2 \cosh (e+f x) \sinh (e+f x)}{4 f^3}+\frac {b^2 (c+d x)^2 \cosh (e+f x) \sinh (e+f x)}{2 f}-\frac {b^2 d (c+d x) \sinh ^2(e+f x)}{2 f^2} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.42 (sec) , antiderivative size = 249, normalized size of antiderivative = 1.37 \[ \int (c+d x)^2 (a+b \sinh (e+f x))^2 \, dx=\frac {24 a^2 c^2 f^3 x-12 b^2 c^2 f^3 x+24 a^2 c d f^3 x^2-12 b^2 c d f^3 x^2+8 a^2 d^2 f^3 x^3-4 b^2 d^2 f^3 x^3+48 a b \left (c^2 f^2+2 c d f^2 x+d^2 \left (2+f^2 x^2\right )\right ) \cosh (e+f x)-6 b^2 d f (c+d x) \cosh (2 (e+f x))-96 a b c d f \sinh (e+f x)-96 a b d^2 f x \sinh (e+f x)+3 b^2 d^2 \sinh (2 (e+f x))+6 b^2 c^2 f^2 \sinh (2 (e+f x))+12 b^2 c d f^2 x \sinh (2 (e+f x))+6 b^2 d^2 f^2 x^2 \sinh (2 (e+f x))}{24 f^3} \]

[In]

Integrate[(c + d*x)^2*(a + b*Sinh[e + f*x])^2,x]

[Out]

(24*a^2*c^2*f^3*x - 12*b^2*c^2*f^3*x + 24*a^2*c*d*f^3*x^2 - 12*b^2*c*d*f^3*x^2 + 8*a^2*d^2*f^3*x^3 - 4*b^2*d^2
*f^3*x^3 + 48*a*b*(c^2*f^2 + 2*c*d*f^2*x + d^2*(2 + f^2*x^2))*Cosh[e + f*x] - 6*b^2*d*f*(c + d*x)*Cosh[2*(e +
f*x)] - 96*a*b*c*d*f*Sinh[e + f*x] - 96*a*b*d^2*f*x*Sinh[e + f*x] + 3*b^2*d^2*Sinh[2*(e + f*x)] + 6*b^2*c^2*f^
2*Sinh[2*(e + f*x)] + 12*b^2*c*d*f^2*x*Sinh[2*(e + f*x)] + 6*b^2*d^2*f^2*x^2*Sinh[2*(e + f*x)])/(24*f^3)

Maple [A] (verified)

Time = 1.35 (sec) , antiderivative size = 157, normalized size of antiderivative = 0.86

method result size
parallelrisch \(\frac {b^{2} \left (\left (d x +c \right )^{2} f^{2}+\frac {d^{2}}{2}\right ) \sinh \left (2 f x +2 e \right )-b^{2} d f \left (d x +c \right ) \cosh \left (2 f x +2 e \right )+8 b a \left (\left (d x +c \right )^{2} f^{2}+2 d^{2}\right ) \cosh \left (f x +e \right )-16 a b d f \left (d x +c \right ) \sinh \left (f x +e \right )+4 \left (\frac {1}{3} d^{2} x^{2}+c d x +c^{2}\right ) \left (a^{2}-\frac {b^{2}}{2}\right ) x \,f^{3}+8 a b \,c^{2} f^{2}+b^{2} c d f +16 a \,d^{2} b}{4 f^{3}}\) \(157\)
risch \(\frac {a^{2} d^{2} x^{3}}{3}-\frac {d^{2} b^{2} x^{3}}{6}+d \,a^{2} c \,x^{2}-\frac {d \,b^{2} c \,x^{2}}{2}+a^{2} c^{2} x -\frac {b^{2} c^{2} x}{2}+\frac {a^{2} c^{3}}{3 d}-\frac {b^{2} c^{3}}{6 d}+\frac {b^{2} \left (2 d^{2} x^{2} f^{2}+4 c d \,f^{2} x +2 c^{2} f^{2}-2 d^{2} f x -2 c d f +d^{2}\right ) {\mathrm e}^{2 f x +2 e}}{16 f^{3}}+\frac {a b \left (d^{2} x^{2} f^{2}+2 c d \,f^{2} x +c^{2} f^{2}-2 d^{2} f x -2 c d f +2 d^{2}\right ) {\mathrm e}^{f x +e}}{f^{3}}+\frac {a b \left (d^{2} x^{2} f^{2}+2 c d \,f^{2} x +c^{2} f^{2}+2 d^{2} f x +2 c d f +2 d^{2}\right ) {\mathrm e}^{-f x -e}}{f^{3}}-\frac {b^{2} \left (2 d^{2} x^{2} f^{2}+4 c d \,f^{2} x +2 c^{2} f^{2}+2 d^{2} f x +2 c d f +d^{2}\right ) {\mathrm e}^{-2 f x -2 e}}{16 f^{3}}\) \(315\)
parts \(\frac {a^{2} \left (d x +c \right )^{3}}{3 d}+\frac {b^{2} \left (\frac {d^{2} \left (\frac {\left (f x +e \right )^{2} \cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {\left (f x +e \right )^{3}}{6}-\frac {\left (f x +e \right ) \cosh \left (f x +e \right )^{2}}{2}+\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{4}+\frac {f x}{4}+\frac {e}{4}\right )}{f^{2}}-\frac {2 d^{2} e \left (\frac {\left (f x +e \right ) \cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {\left (f x +e \right )^{2}}{4}-\frac {\cosh \left (f x +e \right )^{2}}{4}\right )}{f^{2}}+\frac {d^{2} e^{2} \left (\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {f x}{2}-\frac {e}{2}\right )}{f^{2}}+\frac {2 c d \left (\frac {\left (f x +e \right ) \cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {\left (f x +e \right )^{2}}{4}-\frac {\cosh \left (f x +e \right )^{2}}{4}\right )}{f}-\frac {2 c d e \left (\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {f x}{2}-\frac {e}{2}\right )}{f}+c^{2} \left (\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {f x}{2}-\frac {e}{2}\right )\right )}{f}+\frac {2 a b \left (\frac {d^{2} \left (\left (f x +e \right )^{2} \cosh \left (f x +e \right )-2 \left (f x +e \right ) \sinh \left (f x +e \right )+2 \cosh \left (f x +e \right )\right )}{f^{2}}-\frac {2 d^{2} e \left (\left (f x +e \right ) \cosh \left (f x +e \right )-\sinh \left (f x +e \right )\right )}{f^{2}}+\frac {2 d c \left (\left (f x +e \right ) \cosh \left (f x +e \right )-\sinh \left (f x +e \right )\right )}{f}+\frac {d^{2} e^{2} \cosh \left (f x +e \right )}{f^{2}}-\frac {2 d e c \cosh \left (f x +e \right )}{f}+c^{2} \cosh \left (f x +e \right )\right )}{f}\) \(430\)
derivativedivides \(\frac {\frac {d^{2} a^{2} \left (f x +e \right )^{3}}{3 f^{2}}+\frac {2 d^{2} a b \left (\left (f x +e \right )^{2} \cosh \left (f x +e \right )-2 \left (f x +e \right ) \sinh \left (f x +e \right )+2 \cosh \left (f x +e \right )\right )}{f^{2}}+\frac {d^{2} b^{2} \left (\frac {\left (f x +e \right )^{2} \cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {\left (f x +e \right )^{3}}{6}-\frac {\left (f x +e \right ) \cosh \left (f x +e \right )^{2}}{2}+\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{4}+\frac {f x}{4}+\frac {e}{4}\right )}{f^{2}}-\frac {d^{2} e \,a^{2} \left (f x +e \right )^{2}}{f^{2}}-\frac {4 d^{2} e a b \left (\left (f x +e \right ) \cosh \left (f x +e \right )-\sinh \left (f x +e \right )\right )}{f^{2}}-\frac {2 d^{2} e \,b^{2} \left (\frac {\left (f x +e \right ) \cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {\left (f x +e \right )^{2}}{4}-\frac {\cosh \left (f x +e \right )^{2}}{4}\right )}{f^{2}}+\frac {d c \,a^{2} \left (f x +e \right )^{2}}{f}+\frac {4 d c a b \left (\left (f x +e \right ) \cosh \left (f x +e \right )-\sinh \left (f x +e \right )\right )}{f}+\frac {2 d c \,b^{2} \left (\frac {\left (f x +e \right ) \cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {\left (f x +e \right )^{2}}{4}-\frac {\cosh \left (f x +e \right )^{2}}{4}\right )}{f}+\frac {d^{2} e^{2} a^{2} \left (f x +e \right )}{f^{2}}+\frac {2 d^{2} e^{2} a b \cosh \left (f x +e \right )}{f^{2}}+\frac {d^{2} e^{2} b^{2} \left (\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {f x}{2}-\frac {e}{2}\right )}{f^{2}}-\frac {2 d e c \,a^{2} \left (f x +e \right )}{f}-\frac {4 d e c a b \cosh \left (f x +e \right )}{f}-\frac {2 d e c \,b^{2} \left (\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {f x}{2}-\frac {e}{2}\right )}{f}+a^{2} c^{2} \left (f x +e \right )+2 a \,c^{2} b \cosh \left (f x +e \right )+b^{2} c^{2} \left (\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {f x}{2}-\frac {e}{2}\right )}{f}\) \(535\)
default \(\frac {\frac {d^{2} a^{2} \left (f x +e \right )^{3}}{3 f^{2}}+\frac {2 d^{2} a b \left (\left (f x +e \right )^{2} \cosh \left (f x +e \right )-2 \left (f x +e \right ) \sinh \left (f x +e \right )+2 \cosh \left (f x +e \right )\right )}{f^{2}}+\frac {d^{2} b^{2} \left (\frac {\left (f x +e \right )^{2} \cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {\left (f x +e \right )^{3}}{6}-\frac {\left (f x +e \right ) \cosh \left (f x +e \right )^{2}}{2}+\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{4}+\frac {f x}{4}+\frac {e}{4}\right )}{f^{2}}-\frac {d^{2} e \,a^{2} \left (f x +e \right )^{2}}{f^{2}}-\frac {4 d^{2} e a b \left (\left (f x +e \right ) \cosh \left (f x +e \right )-\sinh \left (f x +e \right )\right )}{f^{2}}-\frac {2 d^{2} e \,b^{2} \left (\frac {\left (f x +e \right ) \cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {\left (f x +e \right )^{2}}{4}-\frac {\cosh \left (f x +e \right )^{2}}{4}\right )}{f^{2}}+\frac {d c \,a^{2} \left (f x +e \right )^{2}}{f}+\frac {4 d c a b \left (\left (f x +e \right ) \cosh \left (f x +e \right )-\sinh \left (f x +e \right )\right )}{f}+\frac {2 d c \,b^{2} \left (\frac {\left (f x +e \right ) \cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {\left (f x +e \right )^{2}}{4}-\frac {\cosh \left (f x +e \right )^{2}}{4}\right )}{f}+\frac {d^{2} e^{2} a^{2} \left (f x +e \right )}{f^{2}}+\frac {2 d^{2} e^{2} a b \cosh \left (f x +e \right )}{f^{2}}+\frac {d^{2} e^{2} b^{2} \left (\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {f x}{2}-\frac {e}{2}\right )}{f^{2}}-\frac {2 d e c \,a^{2} \left (f x +e \right )}{f}-\frac {4 d e c a b \cosh \left (f x +e \right )}{f}-\frac {2 d e c \,b^{2} \left (\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {f x}{2}-\frac {e}{2}\right )}{f}+a^{2} c^{2} \left (f x +e \right )+2 a \,c^{2} b \cosh \left (f x +e \right )+b^{2} c^{2} \left (\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {f x}{2}-\frac {e}{2}\right )}{f}\) \(535\)

[In]

int((d*x+c)^2*(a+b*sinh(f*x+e))^2,x,method=_RETURNVERBOSE)

[Out]

1/4*(b^2*((d*x+c)^2*f^2+1/2*d^2)*sinh(2*f*x+2*e)-b^2*d*f*(d*x+c)*cosh(2*f*x+2*e)+8*b*a*((d*x+c)^2*f^2+2*d^2)*c
osh(f*x+e)-16*a*b*d*f*(d*x+c)*sinh(f*x+e)+4*(1/3*d^2*x^2+c*d*x+c^2)*(a^2-1/2*b^2)*x*f^3+8*a*b*c^2*f^2+b^2*c*d*
f+16*a*d^2*b)/f^3

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 247, normalized size of antiderivative = 1.36 \[ \int (c+d x)^2 (a+b \sinh (e+f x))^2 \, dx=\frac {2 \, {\left (2 \, a^{2} - b^{2}\right )} d^{2} f^{3} x^{3} + 6 \, {\left (2 \, a^{2} - b^{2}\right )} c d f^{3} x^{2} + 6 \, {\left (2 \, a^{2} - b^{2}\right )} c^{2} f^{3} x - 3 \, {\left (b^{2} d^{2} f x + b^{2} c d f\right )} \cosh \left (f x + e\right )^{2} - 3 \, {\left (b^{2} d^{2} f x + b^{2} c d f\right )} \sinh \left (f x + e\right )^{2} + 24 \, {\left (a b d^{2} f^{2} x^{2} + 2 \, a b c d f^{2} x + a b c^{2} f^{2} + 2 \, a b d^{2}\right )} \cosh \left (f x + e\right ) - 3 \, {\left (16 \, a b d^{2} f x + 16 \, a b c d f - {\left (2 \, b^{2} d^{2} f^{2} x^{2} + 4 \, b^{2} c d f^{2} x + 2 \, b^{2} c^{2} f^{2} + b^{2} d^{2}\right )} \cosh \left (f x + e\right )\right )} \sinh \left (f x + e\right )}{12 \, f^{3}} \]

[In]

integrate((d*x+c)^2*(a+b*sinh(f*x+e))^2,x, algorithm="fricas")

[Out]

1/12*(2*(2*a^2 - b^2)*d^2*f^3*x^3 + 6*(2*a^2 - b^2)*c*d*f^3*x^2 + 6*(2*a^2 - b^2)*c^2*f^3*x - 3*(b^2*d^2*f*x +
 b^2*c*d*f)*cosh(f*x + e)^2 - 3*(b^2*d^2*f*x + b^2*c*d*f)*sinh(f*x + e)^2 + 24*(a*b*d^2*f^2*x^2 + 2*a*b*c*d*f^
2*x + a*b*c^2*f^2 + 2*a*b*d^2)*cosh(f*x + e) - 3*(16*a*b*d^2*f*x + 16*a*b*c*d*f - (2*b^2*d^2*f^2*x^2 + 4*b^2*c
*d*f^2*x + 2*b^2*c^2*f^2 + b^2*d^2)*cosh(f*x + e))*sinh(f*x + e))/f^3

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 456 vs. \(2 (177) = 354\).

Time = 0.33 (sec) , antiderivative size = 456, normalized size of antiderivative = 2.51 \[ \int (c+d x)^2 (a+b \sinh (e+f x))^2 \, dx=\begin {cases} a^{2} c^{2} x + a^{2} c d x^{2} + \frac {a^{2} d^{2} x^{3}}{3} + \frac {2 a b c^{2} \cosh {\left (e + f x \right )}}{f} + \frac {4 a b c d x \cosh {\left (e + f x \right )}}{f} - \frac {4 a b c d \sinh {\left (e + f x \right )}}{f^{2}} + \frac {2 a b d^{2} x^{2} \cosh {\left (e + f x \right )}}{f} - \frac {4 a b d^{2} x \sinh {\left (e + f x \right )}}{f^{2}} + \frac {4 a b d^{2} \cosh {\left (e + f x \right )}}{f^{3}} + \frac {b^{2} c^{2} x \sinh ^{2}{\left (e + f x \right )}}{2} - \frac {b^{2} c^{2} x \cosh ^{2}{\left (e + f x \right )}}{2} + \frac {b^{2} c^{2} \sinh {\left (e + f x \right )} \cosh {\left (e + f x \right )}}{2 f} + \frac {b^{2} c d x^{2} \sinh ^{2}{\left (e + f x \right )}}{2} - \frac {b^{2} c d x^{2} \cosh ^{2}{\left (e + f x \right )}}{2} + \frac {b^{2} c d x \sinh {\left (e + f x \right )} \cosh {\left (e + f x \right )}}{f} - \frac {b^{2} c d \sinh ^{2}{\left (e + f x \right )}}{2 f^{2}} + \frac {b^{2} d^{2} x^{3} \sinh ^{2}{\left (e + f x \right )}}{6} - \frac {b^{2} d^{2} x^{3} \cosh ^{2}{\left (e + f x \right )}}{6} + \frac {b^{2} d^{2} x^{2} \sinh {\left (e + f x \right )} \cosh {\left (e + f x \right )}}{2 f} - \frac {b^{2} d^{2} x \sinh ^{2}{\left (e + f x \right )}}{4 f^{2}} - \frac {b^{2} d^{2} x \cosh ^{2}{\left (e + f x \right )}}{4 f^{2}} + \frac {b^{2} d^{2} \sinh {\left (e + f x \right )} \cosh {\left (e + f x \right )}}{4 f^{3}} & \text {for}\: f \neq 0 \\\left (a + b \sinh {\left (e \right )}\right )^{2} \left (c^{2} x + c d x^{2} + \frac {d^{2} x^{3}}{3}\right ) & \text {otherwise} \end {cases} \]

[In]

integrate((d*x+c)**2*(a+b*sinh(f*x+e))**2,x)

[Out]

Piecewise((a**2*c**2*x + a**2*c*d*x**2 + a**2*d**2*x**3/3 + 2*a*b*c**2*cosh(e + f*x)/f + 4*a*b*c*d*x*cosh(e +
f*x)/f - 4*a*b*c*d*sinh(e + f*x)/f**2 + 2*a*b*d**2*x**2*cosh(e + f*x)/f - 4*a*b*d**2*x*sinh(e + f*x)/f**2 + 4*
a*b*d**2*cosh(e + f*x)/f**3 + b**2*c**2*x*sinh(e + f*x)**2/2 - b**2*c**2*x*cosh(e + f*x)**2/2 + b**2*c**2*sinh
(e + f*x)*cosh(e + f*x)/(2*f) + b**2*c*d*x**2*sinh(e + f*x)**2/2 - b**2*c*d*x**2*cosh(e + f*x)**2/2 + b**2*c*d
*x*sinh(e + f*x)*cosh(e + f*x)/f - b**2*c*d*sinh(e + f*x)**2/(2*f**2) + b**2*d**2*x**3*sinh(e + f*x)**2/6 - b*
*2*d**2*x**3*cosh(e + f*x)**2/6 + b**2*d**2*x**2*sinh(e + f*x)*cosh(e + f*x)/(2*f) - b**2*d**2*x*sinh(e + f*x)
**2/(4*f**2) - b**2*d**2*x*cosh(e + f*x)**2/(4*f**2) + b**2*d**2*sinh(e + f*x)*cosh(e + f*x)/(4*f**3), Ne(f, 0
)), ((a + b*sinh(e))**2*(c**2*x + c*d*x**2 + d**2*x**3/3), True))

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 322, normalized size of antiderivative = 1.77 \[ \int (c+d x)^2 (a+b \sinh (e+f x))^2 \, dx=\frac {1}{3} \, a^{2} d^{2} x^{3} + a^{2} c d x^{2} - \frac {1}{8} \, {\left (4 \, x^{2} - \frac {{\left (2 \, f x e^{\left (2 \, e\right )} - e^{\left (2 \, e\right )}\right )} e^{\left (2 \, f x\right )}}{f^{2}} + \frac {{\left (2 \, f x + 1\right )} e^{\left (-2 \, f x - 2 \, e\right )}}{f^{2}}\right )} b^{2} c d - \frac {1}{48} \, {\left (8 \, x^{3} - \frac {3 \, {\left (2 \, f^{2} x^{2} e^{\left (2 \, e\right )} - 2 \, f x e^{\left (2 \, e\right )} + e^{\left (2 \, e\right )}\right )} e^{\left (2 \, f x\right )}}{f^{3}} + \frac {3 \, {\left (2 \, f^{2} x^{2} + 2 \, f x + 1\right )} e^{\left (-2 \, f x - 2 \, e\right )}}{f^{3}}\right )} b^{2} d^{2} - \frac {1}{8} \, b^{2} c^{2} {\left (4 \, x - \frac {e^{\left (2 \, f x + 2 \, e\right )}}{f} + \frac {e^{\left (-2 \, f x - 2 \, e\right )}}{f}\right )} + a^{2} c^{2} x + 2 \, a b c d {\left (\frac {{\left (f x e^{e} - e^{e}\right )} e^{\left (f x\right )}}{f^{2}} + \frac {{\left (f x + 1\right )} e^{\left (-f x - e\right )}}{f^{2}}\right )} + a b d^{2} {\left (\frac {{\left (f^{2} x^{2} e^{e} - 2 \, f x e^{e} + 2 \, e^{e}\right )} e^{\left (f x\right )}}{f^{3}} + \frac {{\left (f^{2} x^{2} + 2 \, f x + 2\right )} e^{\left (-f x - e\right )}}{f^{3}}\right )} + \frac {2 \, a b c^{2} \cosh \left (f x + e\right )}{f} \]

[In]

integrate((d*x+c)^2*(a+b*sinh(f*x+e))^2,x, algorithm="maxima")

[Out]

1/3*a^2*d^2*x^3 + a^2*c*d*x^2 - 1/8*(4*x^2 - (2*f*x*e^(2*e) - e^(2*e))*e^(2*f*x)/f^2 + (2*f*x + 1)*e^(-2*f*x -
 2*e)/f^2)*b^2*c*d - 1/48*(8*x^3 - 3*(2*f^2*x^2*e^(2*e) - 2*f*x*e^(2*e) + e^(2*e))*e^(2*f*x)/f^3 + 3*(2*f^2*x^
2 + 2*f*x + 1)*e^(-2*f*x - 2*e)/f^3)*b^2*d^2 - 1/8*b^2*c^2*(4*x - e^(2*f*x + 2*e)/f + e^(-2*f*x - 2*e)/f) + a^
2*c^2*x + 2*a*b*c*d*((f*x*e^e - e^e)*e^(f*x)/f^2 + (f*x + 1)*e^(-f*x - e)/f^2) + a*b*d^2*((f^2*x^2*e^e - 2*f*x
*e^e + 2*e^e)*e^(f*x)/f^3 + (f^2*x^2 + 2*f*x + 2)*e^(-f*x - e)/f^3) + 2*a*b*c^2*cosh(f*x + e)/f

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 344 vs. \(2 (170) = 340\).

Time = 0.27 (sec) , antiderivative size = 344, normalized size of antiderivative = 1.89 \[ \int (c+d x)^2 (a+b \sinh (e+f x))^2 \, dx=\frac {1}{3} \, a^{2} d^{2} x^{3} - \frac {1}{6} \, b^{2} d^{2} x^{3} + a^{2} c d x^{2} - \frac {1}{2} \, b^{2} c d x^{2} + a^{2} c^{2} x - \frac {1}{2} \, b^{2} c^{2} x + \frac {{\left (2 \, b^{2} d^{2} f^{2} x^{2} + 4 \, b^{2} c d f^{2} x + 2 \, b^{2} c^{2} f^{2} - 2 \, b^{2} d^{2} f x - 2 \, b^{2} c d f + b^{2} d^{2}\right )} e^{\left (2 \, f x + 2 \, e\right )}}{16 \, f^{3}} + \frac {{\left (a b d^{2} f^{2} x^{2} + 2 \, a b c d f^{2} x + a b c^{2} f^{2} - 2 \, a b d^{2} f x - 2 \, a b c d f + 2 \, a b d^{2}\right )} e^{\left (f x + e\right )}}{f^{3}} + \frac {{\left (a b d^{2} f^{2} x^{2} + 2 \, a b c d f^{2} x + a b c^{2} f^{2} + 2 \, a b d^{2} f x + 2 \, a b c d f + 2 \, a b d^{2}\right )} e^{\left (-f x - e\right )}}{f^{3}} - \frac {{\left (2 \, b^{2} d^{2} f^{2} x^{2} + 4 \, b^{2} c d f^{2} x + 2 \, b^{2} c^{2} f^{2} + 2 \, b^{2} d^{2} f x + 2 \, b^{2} c d f + b^{2} d^{2}\right )} e^{\left (-2 \, f x - 2 \, e\right )}}{16 \, f^{3}} \]

[In]

integrate((d*x+c)^2*(a+b*sinh(f*x+e))^2,x, algorithm="giac")

[Out]

1/3*a^2*d^2*x^3 - 1/6*b^2*d^2*x^3 + a^2*c*d*x^2 - 1/2*b^2*c*d*x^2 + a^2*c^2*x - 1/2*b^2*c^2*x + 1/16*(2*b^2*d^
2*f^2*x^2 + 4*b^2*c*d*f^2*x + 2*b^2*c^2*f^2 - 2*b^2*d^2*f*x - 2*b^2*c*d*f + b^2*d^2)*e^(2*f*x + 2*e)/f^3 + (a*
b*d^2*f^2*x^2 + 2*a*b*c*d*f^2*x + a*b*c^2*f^2 - 2*a*b*d^2*f*x - 2*a*b*c*d*f + 2*a*b*d^2)*e^(f*x + e)/f^3 + (a*
b*d^2*f^2*x^2 + 2*a*b*c*d*f^2*x + a*b*c^2*f^2 + 2*a*b*d^2*f*x + 2*a*b*c*d*f + 2*a*b*d^2)*e^(-f*x - e)/f^3 - 1/
16*(2*b^2*d^2*f^2*x^2 + 4*b^2*c*d*f^2*x + 2*b^2*c^2*f^2 + 2*b^2*d^2*f*x + 2*b^2*c*d*f + b^2*d^2)*e^(-2*f*x - 2
*e)/f^3

Mupad [B] (verification not implemented)

Time = 1.29 (sec) , antiderivative size = 281, normalized size of antiderivative = 1.54 \[ \int (c+d x)^2 (a+b \sinh (e+f x))^2 \, dx=a^2\,c^2\,x-\frac {b^2\,c^2\,x}{2}+\frac {a^2\,d^2\,x^3}{3}-\frac {b^2\,d^2\,x^3}{6}+\frac {b^2\,c^2\,\mathrm {sinh}\left (2\,e+2\,f\,x\right )}{4\,f}+\frac {b^2\,d^2\,\mathrm {sinh}\left (2\,e+2\,f\,x\right )}{8\,f^3}+a^2\,c\,d\,x^2-\frac {b^2\,c\,d\,x^2}{2}+\frac {2\,a\,b\,c^2\,\mathrm {cosh}\left (e+f\,x\right )}{f}+\frac {4\,a\,b\,d^2\,\mathrm {cosh}\left (e+f\,x\right )}{f^3}+\frac {b^2\,d^2\,x^2\,\mathrm {sinh}\left (2\,e+2\,f\,x\right )}{4\,f}-\frac {b^2\,c\,d\,\mathrm {cosh}\left (2\,e+2\,f\,x\right )}{4\,f^2}-\frac {b^2\,d^2\,x\,\mathrm {cosh}\left (2\,e+2\,f\,x\right )}{4\,f^2}-\frac {4\,a\,b\,c\,d\,\mathrm {sinh}\left (e+f\,x\right )}{f^2}-\frac {4\,a\,b\,d^2\,x\,\mathrm {sinh}\left (e+f\,x\right )}{f^2}+\frac {2\,a\,b\,d^2\,x^2\,\mathrm {cosh}\left (e+f\,x\right )}{f}+\frac {b^2\,c\,d\,x\,\mathrm {sinh}\left (2\,e+2\,f\,x\right )}{2\,f}+\frac {4\,a\,b\,c\,d\,x\,\mathrm {cosh}\left (e+f\,x\right )}{f} \]

[In]

int((a + b*sinh(e + f*x))^2*(c + d*x)^2,x)

[Out]

a^2*c^2*x - (b^2*c^2*x)/2 + (a^2*d^2*x^3)/3 - (b^2*d^2*x^3)/6 + (b^2*c^2*sinh(2*e + 2*f*x))/(4*f) + (b^2*d^2*s
inh(2*e + 2*f*x))/(8*f^3) + a^2*c*d*x^2 - (b^2*c*d*x^2)/2 + (2*a*b*c^2*cosh(e + f*x))/f + (4*a*b*d^2*cosh(e +
f*x))/f^3 + (b^2*d^2*x^2*sinh(2*e + 2*f*x))/(4*f) - (b^2*c*d*cosh(2*e + 2*f*x))/(4*f^2) - (b^2*d^2*x*cosh(2*e
+ 2*f*x))/(4*f^2) - (4*a*b*c*d*sinh(e + f*x))/f^2 - (4*a*b*d^2*x*sinh(e + f*x))/f^2 + (2*a*b*d^2*x^2*cosh(e +
f*x))/f + (b^2*c*d*x*sinh(2*e + 2*f*x))/(2*f) + (4*a*b*c*d*x*cosh(e + f*x))/f